package com.czk.bootlettuce.redlock.config;

import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author chenzhangkun
 * @ClassName RedLockConfig
 * @description: TODO
 * @date 2024年11月15日
 */
@Configuration
public class RedLockConfig {

	@Bean(name = "firstRedLockServer")
	public Config server_1(){
		Config config=new Config();
		config.useSingleServer().setAddress("redis://localhost:6379");
		return config;
	}
	@Bean(name = "secondRedLockServer")
	public Config server_2(){
		Config config=new Config();
		config.useSingleServer().setAddress("redis://localhost:6379");
		return config;
	}

	@Bean(name = "thirdRedLockServer")
	public Config server_3(){
		Config config=new Config();
		config.useSingleServer().setAddress("redis://localhost:6379");
		return config;
	}


}
